<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>jsPDF - Documentation</title>

    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="jsPDF.html">jsPDF</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addFont">addFont</a></li><li><a href="global.html#addHTML">addHTML</a></li><li><a href="global.html#addMetadata">addMetadata</a></li><li><a href="global.html#addPage">addPage</a></li><li><a href="global.html#autoPrint">autoPrint</a></li><li><a href="global.html#CapJoinStyles">CapJoinStyles</a></li><li><a href="global.html#circle">circle</a></li><li><a href="global.html#ellipse">ellipse</a></li><li><a href="global.html#getFontList">getFontList</a></li><li><a href="global.html#lines">lines</a></li><li><a href="global.html#lstext">lstext</a></li><li><a href="global.html#output">output</a></li><li><a href="global.html#rect">rect</a></li><li><a href="global.html#roundedRect">roundedRect</a></li><li><a href="global.html#save">save</a></li><li><a href="global.html#setDisplayMode">setDisplayMode</a></li><li><a href="global.html#setDrawColor">setDrawColor</a></li><li><a href="global.html#setFillColor">setFillColor</a></li><li><a href="global.html#setFont">setFont</a></li><li><a href="global.html#setFontSize">setFontSize</a></li><li><a href="global.html#setFontStyle">setFontStyle</a></li><li><a href="global.html#setLineCap">setLineCap</a></li><li><a href="global.html#setLineJoin">setLineJoin</a></li><li><a href="global.html#setLineWidth">setLineWidth</a></li><li><a href="global.html#setPage">setPage</a></li><li><a href="global.html#setProperties">setProperties</a></li><li><a href="global.html#setTextColor">setTextColor</a></li><li><a href="global.html#text">text</a></li><li><a href="global.html#triangle">triangle</a></li><li><a href="global.html#viewerPreferences">viewerPreferences</a></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">jsPDF</h1>
    

    




<section>

<header>
    
        <h2>
        jsPDF
        </h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    <h4 class="name" id="jsPDF"><span class="type-signature"></span>new jsPDF<span class="signature">(orientation, unit, format)</span><span class="type-signature"> &rarr; {<a href="jsPDF.html">jsPDF</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line47">line 47</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>If the first parameter (orientation) is an object, it will be interpreted as an object of named parameters</p>
<pre class="prettyprint source"><code>{
 orientation: 'p',
 unit: 'mm',
 format: 'a4',
 hotfixes: [] // an array of hotfix strings to enable
}</code></pre>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>orientation</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>One of &quot;portrait&quot; or &quot;landscape&quot; (or shortcuts &quot;p&quot; (Default), &quot;l&quot;) <br />
Can also be an options object.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>unit</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>Measurement unit to be used when coordinates are specified.
                   One of &quot;pt&quot; (points), &quot;mm&quot; (Default), &quot;cm&quot;, &quot;in&quot;</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>format</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>One of 'pageFormats' as shown below, default: a4</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        


<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="jsPDF.html">jsPDF</a></span>


    </dd>
</dl>

    


    
    </div>

    

    

    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id=".API"><span class="type-signature">(static) </span>API<span class="type-signature"></span></h4>





<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="jspdf.js.html">jspdf.js</a>, <a href="jspdf.js.html#line2244">line 2244</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>jsPDF.API is a STATIC property of jsPDF class.
jsPDF.API is an object you can add methods and properties to.
The methods / properties you add will show up in new jsPDF objects.</p>
<p>One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,
callbacks to this object. These will be reassigned to all new instances of jsPDF.
Examples:
jsPDF.API.events['initialized'] = function(){ 'this' is API object }
jsPDF.API.events['addFont'] = function(added_font_object){ 'this' is API object }</p>
</div>







    <h5>Example</h5>
    
    <pre class="prettyprint"><code>jsPDF.API.mymethod = function(){
  // 'this' will be ref to internal API object. see jsPDF source
  // , so you can refer to built-in methods like so:
  //     this.line(....)
  //     this.text(....)
}
var pdfdoc = new jsPDF()
pdfdoc.mymethod() // &lt;- !!!!!!</code></pre>



        
    

    

    

    
</article>

</section>




</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Sep 14 2017 20:43:25 GMT+0100 (BST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>